package com.wurao.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wurao.dao.AlipayDao;
import com.wurao.entity.Alipay;
import com.wurao.service.AlipayService;

/**
 * Service接口
 * @author Administrator
 *
 */
@Service("alipayService")
public class AlipayServiceImpl implements AlipayService{

	@Resource(name="alipayDao")
	private AlipayDao alipayDao;

	public AlipayDao getAlipayDao() {
		return alipayDao;
	}

	public void setAlipayDao(AlipayDao alipayDao) {
		this.alipayDao = alipayDao;
	}

	@Override
	public List<Alipay> listAlipay(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return alipayDao.listAlipay(map);
	}

	@Override
	public Long getTotal(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return alipayDao.getTotal(map);
	}

	@Override
	public Alipay findById(Integer id) {
		// TODO Auto-generated method stub
		return alipayDao.findById(id);
	}

	@Override
	public Integer update(Alipay alipay) {
		// TODO Auto-generated method stub
		return alipayDao.update(alipay);
	}

	@Transactional
	public Integer add(Alipay alipay) {
		// TODO Auto-generated method stub
		return alipayDao.add(alipay);
	}

	@Override
	public Integer delete(Integer id) {
		// TODO Auto-generated method stub
		return alipayDao.delete(id);
	}
	
	@Override
	public Alipay findByOrderNo(String orderNo) {
		// TODO Auto-generated method stub
		return alipayDao.findByOrderNo(orderNo);
	}
		
}
